/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class DetFacturasPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "Nro_fac", nullable = false)
    private int nrofac;
    @Basic(optional = false)
    @NotNull
    @Column(name = "productos_prod_cod", nullable = false)
    private int productosProdCod;

    public DetFacturasPK() {
    }

    public DetFacturasPK(int nrofac, int productosProdCod) {
        this.nrofac = nrofac;
        this.productosProdCod = productosProdCod;
    }

    public int getNrofac() {
        return nrofac;
    }

    public void setNrofac(int nrofac) {
        this.nrofac = nrofac;
    }

    public int getProductosProdCod() {
        return productosProdCod;
    }

    public void setProductosProdCod(int productosProdCod) {
        this.productosProdCod = productosProdCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nrofac;
        hash += (int) productosProdCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetFacturasPK)) {
            return false;
        }
        DetFacturasPK other = (DetFacturasPK) object;
        if (this.nrofac != other.nrofac) {
            return false;
        }
        if (this.productosProdCod != other.productosProdCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.DetFacturasPK[ nrofac=" + nrofac + ", productosProdCod=" + productosProdCod + " ]";
    }
    
}
